package cz.artin.adp.commons.db;

import javax.persistence.TypedQuery;
import java.util.List;

/**
 * @author londrusek | libor.ondrusek@artin.cz
 */
public interface CrudDao<T> {

  @SuppressWarnings("rawtypes")
  TypedQuery query(String jpql);

  T get(Long id);

  List<T> getAll();

  T save(T entity);

  T update(T entity);

  void delete(T entity);
}
